class Fat:
  eat_count = 0
  run_count = 0

  def __init__(self, weight):
    self.weight = weight

  @classmethod
  def run(cls):
    cls.run_count += 1
    return - 0.5

  @classmethod
  def eat(cls):
    cls.eat_count += 1
    return 1

weight_Ming = 75
weight_Mei = 45

if __name__ == '__main__':
    add1 = 0
    lose1 = 0
    i = 0
    print("小明有减重需求，每天只吃2餐，每天至少跑步多少次？")
    while i < 2 :
      add1 += Fat.eat()
      while add1 + lose1 >= 0:
        lose1 += Fat.run()
      i += 1
    print(f"小明每天至少跑步{Fat.run_count}次")

    # print("对小美创建对象")
    add2 = 0
    lose2 = 0
    Mei = Fat(weight_Mei)
    print("小美需要增重，她每天吃3餐，跑步5次，她一周的体重变化？")
    for m in range(7):
      for j in range(3):
        add2 += Mei.eat()
      for k in range(5):
        lose2 += Mei.run()
    print(f"小美一周的体重变化为{add2 + lose2}公斤，增重一周后体重为{weight_Mei + add2 + lose2}")


